package com.hangzhou.xyj.model;

import com.hangzhou.xyj.model.base.BaseModel;
import com.hangzhou.xyj.model.type.EMsgHandleResultType;
import com.j256.ormlite.field.DatabaseField;

/**
 * Created by neo.duan on 2016/4/29.
 * 有关加入群组推送信息的model
 */
public class GroupPushMsgModel extends BaseModel {

    public static final String ID = "_id";
    public static final String FORMID = "_fromId";
    public static final String TOID = "_toId";
    public static final String MSG_TIME = "_msgTime";
    public static final String MSG_TYPE = "_mstType";
    public static final String GROUP_ID = "_groupId";
    public static final String GROUP_NAME = "_groupName";
    public static final String GROUP_PIC = "_groupPic";
    public static final String PART_USER_ID = "_partUserId";
    public static final String PART_USER_NAME = "_partUserName";
    public static final String PART_USER_HEAD = "_partUserHead";
    public static final String HANDLE_RESULT = "_handle_result";
    public static final String NOTIFICATION_CONTENT = "_content";
    public static final String IS_READED = "_is_readed";

    //预留字段:用于数据库
    public static final String DATA0 = "_data0";
    public static final String DATA1 = "_data1";
    public static final String DATA2 = "_data2";
    public static final String DATA3 = "_data3";
    public static final String DATA4 = "_data4";
    public static final String DATA5 = "_data5";
    public static final String DATA6 = "_data6";
    public static final String DATA7 = "_data7";

    @DatabaseField(generatedId = true, columnName = ID)
    private int id;

    @DatabaseField(columnName = FORMID)
    private String fromId;
    @DatabaseField(columnName = TOID)
    private String toId;
    @DatabaseField(columnName = MSG_TIME)
    private long msgTime;
    @DatabaseField(columnName = MSG_TYPE)
    private String msgType;
    @DatabaseField(columnName = GROUP_ID)
    private String groupId;
    @DatabaseField(columnName = GROUP_NAME)
    private String groupName;
    @DatabaseField(columnName = GROUP_PIC)
    private String groupPic;
    @DatabaseField(columnName = PART_USER_ID)
    private String partUserId;
    @DatabaseField(columnName = PART_USER_NAME)
    private String partUserName;
    @DatabaseField(columnName = PART_USER_HEAD)
    private String partUserHead;
    @DatabaseField(columnName = NOTIFICATION_CONTENT)
    private String content;
    //是否已经读过
    @DatabaseField(columnName = IS_READED, defaultValue = "false")
    private Boolean isReaded;

    //处理结果：已同意，已拒绝
    @DatabaseField(columnName = HANDLE_RESULT)
    private int handleResult;


    //预留字段
    @DatabaseField(columnName = DATA0)
    private String data0;
    @DatabaseField(columnName = DATA1)
    private String data1;
    @DatabaseField(columnName = DATA2)
    private String data2;
    @DatabaseField(columnName = DATA3)
    private String data3;
    @DatabaseField(columnName = DATA4)
    private String data4;
    @DatabaseField(columnName = DATA5)
    private String data5;
    @DatabaseField(columnName = DATA6)
    private String data6;
    @DatabaseField(columnName = DATA7)
    private String data7;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Boolean getIsReaded() {
        return isReaded;
    }

    public void setIsReaded(Boolean isReaded) {
        this.isReaded = isReaded;
    }

    public String getFromId() {
        return fromId;
    }

    public void setFromId(String fromId) {
        this.fromId = fromId;
    }

    public String getToId() {
        return toId;
    }

    public void setToId(String toId) {
        this.toId = toId;
    }

    public long getMsgTime() {
        return msgTime;
    }

    public void setMsgTime(long msgTime) {
        this.msgTime = msgTime;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getGroupPic() {
        return groupPic;
    }

    public void setGroupPic(String groupPic) {
        this.groupPic = groupPic;
    }

    public String getPartUserId() {
        return partUserId;
    }

    public void setPartUserId(String partUserId) {
        this.partUserId = partUserId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getPartUserName() {
        return partUserName;
    }

    public void setPartUserName(String partUserName) {
        this.partUserName = partUserName;
    }

    public String getPartUserHead() {
        return partUserHead;
    }

    public void setPartUserHead(String partUserHead) {
        this.partUserHead = partUserHead;
    }

    public int getHandleResult() {
        return handleResult;
    }

    public void setHandleResult(EMsgHandleResultType handleResult) {
        this.handleResult = handleResult.getValue();
    }
}
